package com.empire.module.member.controller.admin.mappolygonpoint.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 多边形顶点坐标新增/修改 Request VO")
@Data
public class MapPolygonPointSaveReqVO {

    @Schema(description = "顶点ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19182")
    private Long id;

    @Schema(description = "关联多边形ID（关联member_map_polygon.id）", requiredMode = Schema.RequiredMode.REQUIRED, example = "20399")
    @NotEmpty(message = "关联多边形ID（关联member_map_polygon.id）不能为空")
    private String polygonId;

    @Schema(description = "环索引（0-外环，1+内环，用于复杂多边形）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "环索引（0-外环，1+内环，用于复杂多边形）不能为空")
    private Integer ringIndex;

    @Schema(description = "经度（范围：-180~180）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "经度（范围：-180~180）不能为空")
    private BigDecimal lng;

    @Schema(description = "纬度（范围：-90~90）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "纬度（范围：-90~90）不能为空")
    private BigDecimal lat;

    @Schema(description = "顶点顺序（同一环内从0开始）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "顶点顺序（同一环内从0开始）不能为空")
    private Integer pointIndex;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "创建时间不能为空")
    private LocalDateTime createdAt;

}

